from math import sin, cos, radians, sqrt theta0 = input() theta0 = radians(theta0) theta1 = input() theta1 = radians(theta1) theta = theta0 + theta1 #print theta iter = input() x = input() y = input() z = complex(x,y) print z.real, z.imag for i in range(1,iter): z1 = (cos(theta)*z-sin(theta))/(sin(theta)*z+cos(theta)) print z1.real, z1.imag z =z1